<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>传送门后台管理系统</title>
<link href="tools/adminbootstrap/css/bootstrap.css" rel="stylesheet">
<link href="tools/adminbootstrap/css/site.css" rel="stylesheet">
<link href="tools/adminbootstrap/css/bootstrap-responsive.css"
	rel="stylesheet">
<link rel="stylesheet" href="tools/jqueryUi/jquery-ui.min.css">

<script src="tools/adminbootstrap/js/jquery.js"></script>
<script src="tools/adminbootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="tools/jqueryUi/jquery-ui.min.js"></script>
<script type="text/javascript">
	
	$(document).ready(function(){
		$("#tipsdiv").dialog({
			autoOpen : false
		})
	});
	function adduser_click(){
		$(document).load("json/userNumberExistYZ",{"userInfo.userNumber":$("#userNumber").val()},function(data){
			var d = eval("(" + data + ")");
			alert(d.isexist);
			if(d.isexist=="exist"){
				$("#tipsstr").html("该用户账号已经存在");
				$("#tipsdiv").dialog("open");
			}else{
				$("#adduserform").submit();
			}	
		});
	}
	
</script>
</head>

<body>
<div id="tipsdiv" title="提示!">
		<span style="color: red" id="tipsstr"></span>
</div>
<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container-fluid">
				<a class="btn btn-navbar" data-toggle="collapse"
					data-target=".nav-collapse"> <span class="icon-bar"></span> <span
					class="icon-bar"></span> <span class="icon-bar"></span>
				</a> <a class="brand" href="webnavigationsystemadmin">传送门后台管理系统</a>
				<div class="nav-collapse">
					<ul class="nav">
						<li><a href="webnavigationsystemadmin">主页</a></li>
						<li class="dropdown"><a href="#" class="dropdown-toggle"
							data-toggle="dropdown">用户<b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><a href="admin-adduser">添加用户</a></li>
								<li class="divider"></li>
								<li><a href="admin-setuser">查询用户</a></li>
							</ul></li>
						<li class="dropdown"><a href="#" class="dropdown-toggle"
							data-toggle="dropdown">网站<b class="caret"></b></a>
							<ul class="dropdown-menu">
								<li><a href="admin-addweb">添加网站</a></li>
								<li class="divider"></li>
								<li><a href="admin-setweb">查询网站</a></li>
							</ul></li>
					</ul>
				</div>
			</div>
		</div>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span3">
				<div class="well sidebar-nav">
					<ul class="nav nav-list">
						<li class="nav-header"><i class="icon-user"></i>用户</li>
						<li><a href="admin-adduser">添加用户</a></li>
						<li><a href="admin-setuser">查询用户</a></li>
						<li class="nav-header"><i class="icon-signal"></i>网站</li>
						<li><a href="admin-addweb">添加网站</a></li>
						<li><a href="admin-setweb">查询网站</a></li>
						<li class="nav-header"><i class="icon-wrench"></i>配置</li>
					</ul>
				</div>
			</div>
			 <div class="span9">
		  <div class="row-fluid">
			<div class="page-header">
				<h1>添加用户<small>更新</small></h1>
			</div>
			<s:form id="adduserform" class="form-horizontal"  action="admin_adduser" method="post">
				<fieldset>
					<div class="control-group">
						<label class="control-label" for="name">用户名</label>
						<div class="controls">
							<input type="text" class="input-xlarge" id="userInfo.userName" name="userInfo.userName"/>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="email">账号</label>
						<div class="controls">
							<input type="text" class="input-xlarge" id="userNumber" name="userInfo.userNumber" />
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="pnohe">密码</label>
						<div class="controls">
							<input type="text" class="input-xlarge" id="userInfo.userPassword"name="userInfo.userPassword"/>
						</div>
					</div>
					<div class="control-group">
						<label class="control-label" for="city">积分</label>
						<div class="controls">
							<input type="text" class="input-xlarge" id="userInfo.userCore" name="userInfo.userCore"/>
						</div>
					</div>		
					<div class="form-actions">
						<input type="button" onclick="adduser_click()" class="btn btn-success btn-large" value="添加用户" /> <input type="reset" class="btn" value="重置" />
					</div>					
				</fieldset>
				</s:form>
		  </div>
        </div>
		</div>
		<hr>
		<footer class="well"> &copy;by_zj </footer>
	</div>
</body>
</html>